home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / FPSE_src / system / amiga / plugin / gpu / gpulocal.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-01  |  1.7 KB  |  78 lines

  1. #include "fpse.h"
  2. #include "poly2.h"
  3.  
  4. #define PAL         0
  5. #define FRAMESKIP   0
  6. #define SYSLOGOUT   0
  7.  
  8. #define FRAME_W     1024
  9. #define FRAME_H     512
  10.  
  11. #define SIGN(code,basebit,bit)   (int)( (code)<<(32-basebit-bit) ) >> (32-bit)
  12. #define RAMADR(addr)            ((void*)&ram[addr&0x1fffff])
  13. #define do_prim(prim)           primfunc[*(UINT32*)prim>>24](prim)
  14.  
  15. #define XMIN    gpu.clip_min.x
  16. #define XMAX    gpu.clip_max.x
  17. #define YMIN    gpu.clip_min.y
  18. #define YMAX    gpu.clip_max.y
  19. #define OFFX    gpu.drawoffset.x
  20. #define OFFY    gpu.drawoffset.y
  21.  
  22. enum { NOTRANS, MEM2VRAM, VRAM2MEM };
  23.  
  24. typedef struct {
  25.     int x,y;
  26. } POS;
  27.  
  28. typedef struct {
  29.     int x,y,w,h;
  30. } AREA;
  31.  
  32. typedef struct {
  33.     UINT32  status;
  34.     UINT32  info[8];
  35.  
  36.     POS     drawoffset;
  37.     AREA    screen;
  38.     AREA    disp;
  39.     POS     clip_min;
  40.     POS     clip_max;
  41.     AREA    texwindow;
  42.  
  43. /* primtive recieve buffer */
  44.     UINT32  primdata[16];
  45.     int     primsize;
  46.     int     primptr;
  47.     int     retval;
  48.     int     tpage;
  49. } GPU_Type;
  50.  
  51. // Global vars
  52. extern GPU_Type  gpu;
  53. extern INT16    *vram;
  54. extern UINT8    *ram;
  55. extern UINT8     primsizeT[256];
  56. extern int       px,py;
  57. extern int       x_start,y_start,x_end,y_end;
  58. extern UINT8     inTrans,toUpdate;
  59. extern UINT16   *pvram;
  60. extern int     (*primfunc[256])();
  61.  
  62. // gpumain.c
  63. int tpage_changed(int tpage);
  64. int clut_changed(int clut);
  65. void vramchange(int x0,int y0,int x1,int y1);
  66. void* get_clutcache(int clut,int size,int color);
  67. void* get_tcache(int tpage);
  68.  
  69. // win.c
  70. void screen_update();
  71. void *win_createbitmap(int w,int h,int bits);
  72. void win_resize(int w, int h);
  73. void win_destroy(void);
  74.  
  75. // cache.c
  76. void CacheInit(void);
  77. void CacheDeinit(void);
  78. INT16 *get_texture(UINT32 tpage, UINT32 clut);